#!/bin/bash
echo "=== 强制重建 system-server ==="
cd /opt/tonic-salvo/apps/system

echo "清理缓存..."
cargo clean

echo "重新生成proto文件..."
touch build.rs

echo "开始编译..."
cargo build --bin system-server

if [ $? -eq 0 ]; then
    echo "✅ 编译成功！"
else
    echo "❌ 编译失败"
fi 